package com.lushuan.ch11_springboot_test.demo.threadpool;

/**
 * ch5_Java中sleep和wait方法的区别
 */
public class SleepAndWaitDemo {


    public static void main(String[] args) {
        System.out.println("Thread started.");
        try {
            // 暂停当前线程2秒
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            System.out.println("Thread was interrupted.");
        }
        System.out.println("Thread resumed after sleep.");
    }




}
